<?php

namespace app\home\validate;
use think\Validate;

class Signup extends Validate
{
    protected $rule = [
        'name'              => 'require|alphaDash|unique:user',
        'mobile'            => 'require|mobile|unique:user',
        'password'          => 'min:6|max:16',
    ];

    protected $message = [

        'name.require'      => '编号不能为空',
        'name.unique'       => '编号已存在',
        'name.alphaDash'    => '编号格式只能是字母、数组、—或_',

        'mobile.require'    => '手机号不能为空',
        'mobile.unique'     => '手机号已存在',
        'mobile.mobile'     => '手机号码格式不正确',
        'password.min'      => '密码长度不能小于6位',
        'password.max'      => '密码长度不能大于16位',
    ];
}